Skip to content

[Microchip TA-100] Fix port + update to cryptoauthlib v3.6.0#9702

Open
danielinux wants to merge 11 commits intowolfSSL:masterfrom
danielinux:ta100_2025
Open

[Microchip TA-100] Fix port + update to cryptoauthlib v3.6.0#9702
danielinux wants to merge 11 commits intowolfSSL:masterfrom
danielinux:ta100_2025

Conversation

@danielinux
Copy link
Member

Description

Rework of TA-100 support to match cryptoauthlib v3.6.0's API. AES-GCM now working.

Fixes zd#20640

Testing

Used wolfDemo board (STM32U585) + TA100 mikrobus module.

Test log (with verbose TA-100 interactions) attached.

test_12a16e6cc.log

Copilot AI review requested due to automatic review settings January 22, 2026 17:00

This comment was marked as outdated.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 11 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dgarske
Copy link
Contributor

dgarske commented Feb 12, 2026

Jenkins retest this please.

@dgarske dgarske requested a review from tmael February 12, 2026 05:49
@dgarske
Copy link
Contributor

dgarske commented Feb 19, 2026

Jenkins retest this please

@dgarske
Copy link
Contributor

dgarske commented Feb 20, 2026

@danielinux Please rebase and squash this. Hopefully that will resolve things.

@dgarske
Copy link
Contributor

dgarske commented Mar 4, 2026

@tmael can you please help get this PR rebased, merge conflicts resolved and ready for merge? This work has been lingering for way too long.

Copilot AI review requested due to automatic review settings March 5, 2026 01:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

tmael and others added 5 commits March 5, 2026 15:23
- Using correct slot ID for AES keys
- Adjust IV length
- Fallback operations to software for unsupported ECC curves

(all tests passing)
ECC384 should be supported in TA-100
Copilot AI review requested due to automatic review settings March 5, 2026 23:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@dgarske dgarske added the For This Release Release version 5.9.0 label Mar 6, 2026
dgarske
dgarske previously approved these changes Mar 6, 2026
if (ret) {
goto exit_rsa;
}
ret = wc_RsaPublicEncrypt(in, inLen, out, 256, key, &rng);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not duplicate these lines. Just make sure outSz = 256 and use the single call below.

Copilot AI review requested due to automatic review settings March 6, 2026 00:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@douzzer douzzer added the Staged Staged for merge pending final test results and review label Mar 6, 2026
Copy link
Contributor

@douzzer douzzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

automated test results to resolve (just whitespace/formatting stuff):

[check-source-text] [5 of 55] [c44ab82806]
    configure...   real 0m8.940s  user 0m5.585s  sys 0m4.402s
trailing whitespace:
./wolfcrypt/src/ecc.c:
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 10524) #if defined(HAVE_ECC_CHECK_PUBKEY_ORDER) && !defined(WOLFSSL_SP_MATH)·
./tests/api/test_ecc.c:
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 1373)     !defined(WOLFSSL_MICROCHIP_TA100)·
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 1479)     !defined(WOLFSSL_MICROCHIP_TA100)·
C++-style comments:
./wolfcrypt/src/port/atmel/atmel.c:
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 229)     uint8_t  element_CKA;     //!< contains class, key_type & Algorithm mode
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 230)     uint16_t property;        //!< properties of the element
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 231)     uint8_t  usage_key;       //!< usage key
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 232)     uint8_t  write_key;       //!< write key
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 233)     uint8_t  read_key;        //!< read key
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 234)     uint8_t  permission;      //!< permission of the element usage|write|read|
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 235)                               //delete perm
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 236)     uint8_t  byte7_settings;  //!< Byte 7 attributes use_count|exportable|
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 237)                               // lockable|access_limit
unneeded entries in .wolfssl_known_macro_extras:
WOLFSSL_ATECC508A_NOIDLE
WOLFSSL_ATECC_NO_ECDH_ENC
unrecognized macros used:
ATCA_HAL_I2C
ATCA_TFLEX_SUPPORT
ATECC_DEV_TYPE
TA100_ECC_TRACE
WOLFSSL_MANUALLY_SELECT_DEVICE_CONFIG
WOLFSSL_MICROCHIP_AESGCM
WOLFSSL_NO_DEL_HANDLE
add well-formed but unknown macros to .wolfssl_known_macro_extras at top of source tree.

@douzzer douzzer removed the Staged Staged for merge pending final test results and review label Mar 6, 2026
@tmael tmael requested a review from douzzer March 6, 2026 18:43
@tmael
Copy link
Contributor

tmael commented Mar 6, 2026

Jenkins retest this please.

@douzzer douzzer added the Staged Staged for merge pending final test results and review label Mar 9, 2026
Copy link
Contributor

@douzzer douzzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lingering issues:

[check-source-text] [5 of 56] [06e58f99ec]
    configure...   real 0m8.930s  user 0m5.593s  sys 0m4.379s
C++-style comments:
./wolfcrypt/src/port/atmel/atmel.c:
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 231)     uint8_t  element_CKA;     //!< contains class, key_type & Algorithm mode
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 232)     uint16_t property;        //!< properties of the element
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 233)     uint8_t  usage_key;       //!< usage key
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 234)     uint8_t  write_key;       //!< write key
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 235)     uint8_t  read_key;        //!< read key
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 236)     uint8_t  permission;      //!< permission of the element usage|write|read|
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 237)                               //delete perm
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 238)     uint8_t  byte7_settings;  //!< Byte 7 attributes use_count|exportable|
143722b37c (<tesfa@wolfssl.com> 2025-10-15 16:43:36 -0700 239)         

and

[check-configure] [7 of 56] [06e58f99ec]
    bash -n... done.
    shellcheck configure...
In configure.rewritten line 23443:
                as_fn_error $? "CryptoAuthLib found but [ compilation failed. Check config.log for details." "$LINENO" 5 ]
                                                                                                                         ^-- SC2171 (warning): Found trailing ] outside test. Add missing [ or quote if intentional.

For more information:
  https://www.shellcheck.net/wiki/SC2171 -- Found trailing ] outside test. Ad...
   real 0m10.408s  user 0m10.142s  sys 0m0.264s
    scenario started 2026-03-09T16:46:20.197731Z, real elapsed 0m10.486447s
    check-configure fail_analysis

@douzzer douzzer removed the Staged Staged for merge pending final test results and review label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For This Release Release version 5.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants